<?php
	namespace core;
	class View{
		//构造函数
		function __construct($tplName,$vals=array()) {
			$tplName = str_replace(".",DS,$tplName);
			//全局变量变量
			if(is_array($vals)&&count($vals)>0){
				foreach ($vals as $key=>$val) {
					$$key = $val;
				}
			}
			require(ROOT.DS.'template'.DS.TEMPLATE.DS.$tplName.'.tpl.php');
        }
	}
	